package network;

import java.util.ArrayList;

/**
 * used to store data for batch sending through the network profile class
 * 
 * 
 * improvements to make:
 * this class should be modified to make full use of the Data class
 * 
 * 
 * @author jack
 *
 */
public final class SendBatch
{
	private ArrayList<byte[]> unreliable;
	private ArrayList<byte[]> reliable;
	
	public SendBatch()
	{
		unreliable = new ArrayList<byte[]>();
		reliable = new ArrayList<byte[]>();
	}
	/**
	 * adds a discrete data set to be sent, each
	 * data set is entirely contained within one packet
	 * @param b the data to be sent
	 * @param sendReliable
	 */
	public void add(byte[] b, boolean sendReliable)
	{
		ArrayList<byte[]> temp = sendReliable? reliable: unreliable;
		temp.add(b);
	}
	public ArrayList<byte[]> getUnreliableData()
	{
		return unreliable;
	}
	public ArrayList<byte[]> getReliableData()
	{
		return reliable;
	}
	public String toString()
	{
		return unreliable+"   :   "+reliable;
	}
}
